﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CmsSystem/MasterPage/AdminForm.Master"
    AutoEventWireup="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/Scripts/jqGrid/lan/grid.locale-cn.js" type="text/javascript"></script>
    <script src="/Scripts/jqGrid/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/Scripts/customgrideditor.js"></script>
    <link href="/App_Themes/Default/jqueryui/jquery-ui-1.7.1.custom.css" rel="stylesheet"
        type="text/css" />
    <link href="/App_Themes/Default/ui.jqgrid.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        FormID = "dbsetting";
        var setting = {
            colNames: ['ID', '名称', '标题', '类型', '长度', '是否主键', '所属表'],
            colModel: [
                     { name: 'Id', index: 'Id', width: 80, key: true, hidden: true },
                     { name: 'Fieldname', index: 'Fieldname', width: 120, editable: true },
                     { name: 'Caption', index: 'Caption', width: 150, editable: true },
                     { name: 'Fieldtype', index: 'Fieldtype', width: 80, editable: true, edittype: "custom", editoptions: { custom_element: initDbType, custom_value: getDbType} },
                     { name: 'Fieldsize', index: 'Fieldsize', width: 80, editable: true },
                     { name: 'Iskey', index: 'Iskey', width: 80, editable: true },
                     { name: 'Tableid', index: 'Tableid', width: 80, hidden: true }
                    ]
        };
        $(function () {
            var assign = {};
            assign["Tableid"] = ID;
            gridLoad("FIELDS", setting, assign);
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <input type="button" class="button" id="btnsave" value="保存" /><input type="button"
            class="button" value="编译" /><input type="button" class="button" value="设计界面" /></div>
    <fieldset>
        <legend>主界面</legend>
        <div class="row">
            <label class="label">
                标题</label>
            <label class="input">
                <input type="hidden" name="ID" id="ID" />
                <input type="text" name="REMARK" class="I" /></label>
            <label class="label">
                表名</label>
            <label class="input">
                <input type="text" name="TABLENAME" class="I" /></label>
        </div>
        <div class="row">
            <label class="label">
                分类</label>
            <label class="input">
                <input type="text" name="TABLECLASS" class="I" /></label>
        </div>
    </fieldset>
    <fieldset>
        <legend>字段信息</legend>
        <div id="gridpagerFIELDS">
        </div>
        <table id="FIELDS" name="FIELDS" class="FIELDS">
        </table>
    </fieldset>
</asp:Content>
